#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

char findTheDifference(char* s, char* t)
{
    int cnt[26] = { 0 };
    int n = strlen(s), m = strlen(t);
    for (int i = 0; i < n; i++)
    {
        cnt[s[i] - 'a']++;
    }
    for (int j = 0; j < m; j++)
    {
        cnt[t[j] - 'a']--;
        if (cnt[t[j] - 'a'] < 0)
        {
            return t[j];
        }
    }
    return ' ';
}

int main()
{
    char str1[] = "abcd";
    char str2[] = "acrdb";
    char ret = findTheDifference(str1, str2);
    printf("%c \n", ret);
    return 0;
}